<template>
  <div class="container" @click="back(to)">
    <el-icon :size="this.size" color="#a9a9a9">
      <ArrowLeft />
    </el-icon>
  </div>
</template>

<script>
export default {
  name: 'BackTo',
  props: {
    to: {
      type: String,
      default: "back",
    },
    size: {
      type: Number,
      default: 16,
    }
  },
  mounted () {
  },
  methods: {
    back (to) {
      if (to == "back") {
        this.$router.back();
      } else {
        this.$router.push(to);
      }
    }
  },
}
</script>

<style scoped>
.container {
}
</style>